Grammar Analysis and Parsing by Abstract Interpretation
نویسندگان
چکیده
We study abstract interpretations of a fixpoint protoderivation semantics defining the maximal derivations of a transitional semantics of context-free grammars akin to pushdown automata. The result is a hierarchy of bottom-up or top-down semantics refining the classical equational and derivational language semantics and including Knuth grammar problem, classical grammar flow analysis algorithms, and parsing algorithms.
منابع مشابه
Grammar semantics, analysis and parsing by abstract interpretation
We study abstract interpretations of a fixpoint protoderivation semantics defining the maximal derivations of a transitional semantics of context-free grammars akin to pushdown automata. The result is a hierarchy of bottom-up or top-down semantics refining the classical equational and derivational language semantics and including Knuth grammar problems, classical grammar flow analysis algorithm...
متن کاملParsing as abstract interpretation of grammar semantics
Earley’s parsing algorithm is shown to be an abstract interpretation of a refinement of the derivation semantics of context-free grammars.
متن کاملStrictness Analysis for Attribute Grammars
Attribute grammars may be seen as a (rather specialised) lazy or demand-driven programming language. The “programs” in this language take text or parse trees as input and return values of the synthesised attributes to the root as output. From this observation we establish a framework for abstract interpretation of attribute grammars. The framework is used to construct a strictness analysis for ...
متن کاملA constraint-programming approach to parsing with resource-sensitive categorial grammar
Parsing with resource-sensitive categorial grammars (up to the LambekVan Benthem calculus LP) is an NP-complete problem. The traditional approach to parsing with such grammars is based on generate & test and cannot avoid this high worst-case complexity. This paper proposes an alternative approach, based on constraint programming: Given a grammar, constraints formulated on an abstract interpreta...
متن کاملStatic Validation of Dynamically Generated HTML Documents Based on Abstract Parsing and Semantic Processing
Abstract parsing is a static-analysis technique for a program that, given a reference LR(k) context-free grammar, statically checks whether or not every dynamically generated string output by the program conforms to the grammar. The technique operates by applying an LR(k) parser for the reference language to data-flow equations extracted from the program, immediately parsing all the possible st...
متن کامل